1. Field of the Invention
This invention generally relates to an electronic musical instrument, and more particularly, to a waveform generating system and a waveform data storing system for use in electronic musical instruments.
2. Description of the Related Art
Conventionally, a waveform generating system for use in an electronic musical instrument generates a waveform by storing not only data (i.e., waveform data) on the levels of the waveform at predetermined times (i.e., steps), but also difference data representing differences in the levels, of successive steps, and then carries out an interpolation of the waveform data by using the difference data.
This conventional system, however, has a drawback in that a large quantity of data is needed to obtain an almost ideal waveform because the difference data used for the interpolation should cover the total difference in the levels of adjacent points or successive steps sampled for the interpolation. Usually, 10 bits are required to store the waveform data of one step in order to generate a substantially fine waveform, and thus 10 bits are also needed for storing the difference data. Further, even when compressing this data, 7 bits are needed to store the compressed difference data corresponding to one step. Accordingly, a standard 16-bit processor cannot simultaneously read the waveform data and the corresponding difference data for one step at a time.
Further, in the conventional system, when data on the waveform of a half cycle is stored in a memory thereof, data on the waveform of each step to be realized is stored at locations having addresses ranging from the top address "0" of the memory. On the other hand, when reading the waveform data thus stored in the memory, a parameter (hereinafter referred to as a frequency number) having a value corresponding to a sound pitch to be indicated by an operator or user is first accumulated, and the resultant accumulated value thereof is used as an address (hereinafter sometimes referred to as a reading address) for reading the waveform data. Therefore, as shown in FIG. 11(A), at the time of reading the waveform data, when the accumulated value of the frequency number is "0", waveform data not equal to "0" but waveform data stored at the address "0" is read out of the memory, and as a result, a difference in the phase of the output waveform occurs. In the conventional system, to prevent this occurrence of a difference in phase, the accumulated value of the frequency number is corrected by executing a data correction program, or alternatively, a circuit for performing data corrections is provided. For example, the conventional system multiplies the accumulated value of the frequency number by (-1/2), and the waveform data is not read if the accumulated value of the frequency number is within the range of from (-1/2) to 1/2. Further, when the accumulated value of the frequency number enters the range of from 1/2 to 3/2, the waveform data corresponding to the address "0" is read from the memory.
Furthermore, a conventional system generates a waveform, for example, the envelope waveform of the musical sound, by first accumulating speed data having a magnitude corresponding to the gradient of a rising or falling edge of the envelope waveform, and generating the envelope level of each step corresponding to the accumulated value. Usually, the period of the accumulation is in accordance with that of the time sharing processing of generating polyphonic musical sounds by using waveform data of all channels. Nevertheless, if the latter period is assumed to be 1/16 KHz, 1,024,000 (16,000.times.64) steps corresponding to 20-bit binary data are needed to obtain a musical sound having a substantially prolonged period of the radiation, i.e., having a decay or release time of 64 seconds. Although, in practice, even where the system uses data represented by a smaller number of bits, a musical sound having a relatively good quality can be obtained, such a conventional system has a drawback in that an overflow is liable to occur. In contrast, in another conventional system, the period of the time sharing processing of generating polyphonic musical sounds by using waveform data of all channels is prolonged to prevent the occurrence of an overflow. In such a system, however, a time delay occurs between the actual pressing or releasing of the key and the processing of the start or termination of the radiation of a sound, which is usually performed on the data of each channel. Also, a system has been proposed in which the range of the speed data is narrowed, but such a system has a defect in that the system can generate only very limited kinds of waveforms.
Further, in the conventional system, a circuit for generating musical tone signals comprises a portion for generating musical tone waveform data, another portion for generating envelope waveform data and a multiplying circuit for multiplying the musical tone waveform by the envelope waveform data. The circuit for generating musical tone signals outputs a signal representing the result of the multiplication as a musical tone signal.
This conventional system, however, has drawbacks in that the multiplying circuit to be used for multiplication is expensive and that if each of a multiplier and a multiplicand is represented by using, for instance, eight bits, data representing the result of the multiplication (i.e., the product of the musical tone waveform data and the envelope waveform data) becomes 16-bit data, i.e., the number of bits for representing the result of the multiplication becomes relatively large and as an inevitable consequence, a quantity of data is increased.